<template>
  <div>
    {{ a }}
    b:{{ b }}
    <input type="button" value="修改a" @click="ok" />
  </div>
</template>

<script lang="ts">
import { ref, onMounted, watch, watchEffect, computed } from 'vue';
export default {
  setup() {
    let a = ref(100);
    let b = ref(200);

    const ok = () => {
      a.value++;
    };
    onMounted(() => {
      console.log(1111);
    });
    watch(a, () => {});

    return {
      a,
      b,
      ok,
    };
  },
};
</script>

<style scoped></style>
